Singular and plural functions for functional logic programming
نویسندگان
چکیده
Modern functional logic programming (FLP) languages use non-terminating and nonconfluent constructor systems (CSs) as programs in order to define non-strict and nondeterministic functions. Two semantic alternatives have been usually considered for parameter passing with this kind of functions: call-time choice and run-time choice. While the former is the standard choice of modern FLP languages, the latter lacks some basic properties – mainly compositionality – that have prevented its use in practical FLP systems. Traditionally it has been considered that call-time choice induces a singular denotational semantics, while run-time choice induces a plural semantics. We have discovered that this latter identification is wrong when pattern matching is involved, and thus in this paper we propose two novel compositional plural semantics for CSs that are different from run-time choice. We investigate the basic properties of our plural semantics – compositionality, polarity, and monotonicity for substitutions, and a restricted form of the bubbling property for CSs – and the relation between them and to previous proposals, concluding that these semantics form a hierarchy in the sense of set inclusion of the set of values computed by them. Besides, we have identified a class of programs characterized by a simple syntactic criterion for which the proposed plural semantics behave the same, and a program transformation that can be used to simulate one of the proposed plural semantics by term rewriting. At the practical level, we study how to use the new expressive capabilities of these semantics for improving the declarative flavor of programs. As call-time choice is the standard semantics for FLP, it still remains the best option for many common programming patterns. Therefore, we propose a language that combines call-time choice and our plural semantics, which we have implemented in the Maude system. The resulting interpreter is then employed to develop and test several significant examples showing the capabilities of the combined semantics.
منابع مشابه
Adding Plural Arguments to Curry Programs
Functional logic languages combine lazy (demand-driven) evaluation strategies from functional programming with non-deterministic computations from logic programming. To provide a strategy-independent semantics, most languages are based on the call-time choice semantics where parameters are passed as values. From an implementation point of view, the call-time choice semantics fits well with shar...
متن کاملDonkey Pluralities: Plural Information States vs. Non-Atomic Individuals
The paper argues that two distinct and independent notions of plurality are involved in natural language anaphora and quantification: plural reference (the usual non-atomic individuals) and plural discourse reference, i.e. reference to a quantificational dependency between sets of objects (e.g. atomic / non-atomic individuals) that is established and subsequently elaborated upon in discourse. F...
متن کاملSingular Interpretations Linger During the Processing of Plural Noun Phrases
Plural nouns do not strictly refer to more than one object, which suggests that they are not semantically marked to mean “more than one” and that plurality inferences are made via a scalar implicature. Consistent with that hypothesis, recent evidence using a picture-matching paradigm supports founds that participants were equally fast to respond to a picture of a single object as a picture of m...
متن کاملPlural Anaphora in Property-theoretic Discourse Theory
It is possible to use a combination of classical logic and dependent types to represent natural language discourse and singular anaphora (Fox, 1994a). In this paper, these ideas are extended to account for some cases of plural anaphora. In the theory described, PT D , universal quantiication and conditionals give rise to a context in which singular referents within its scope are transformed int...
متن کاملSuperplural Logic Msc in Logic
Plural logic adds to singular logic plural variables and a two-place connective ‘is/are among’, written ‘ ́’. Superplural logic adds to plural logic higher-level variables and higher-level twoplace connectives ‘are among’, written ‘ ́n’. This thesis examines the linguistic, logical, and philosophical status of superplural logic. I begin by asking whether the idea of a superplural logic is intelli...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- TPLP
دوره 14 شماره
صفحات -
تاریخ انتشار 2014